﻿using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;

namespace TCOChart
{
    public class User
    {
        public int ID { get; set; }
        public string text { get; set; }
    }
    internal class DatabaseHelper
    {
        //private static SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
        //{
        //    ConnectionString = "Data Source=" + Path.Combine(Environment.CurrentDirectory, "Data\\mydb.db"),
        //    DbType = DbType.Sqlite,
        //    IsAutoCloseConnection = true,
        //    InitKeyType = InitKeyType.Attribute
        //});
        //public static List<User> GetAllUsers()
        //{
        //    return db.Queryable<User>().ToList();
        //}

        //public static void AddUser(User user)
        //{
        //    db.Insertable(user).ExecuteCommand();
        //}

        //public static void UpdateUser(User user)
        //{
        //    db.Updateable(user).ExecuteCommand();
        //}

        //public static void DeleteUser(int userId)
        //{
        //    db.Deleteable<User>().In(userId).ExecuteCommand();
        //}
    }
}
